package com.hcr.regsiter.controller;

import com.hcr.regsiter.dao.RegisterDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageController {

    @Autowired
    private RegisterDao registerDao;

    @RequestMapping("qrcode")
    public String index(Model model, String id){
        registerDao.updateScanStatus(id);
        model.addAttribute("id",id);
        return "index.html";
    }

    @RequestMapping("ok")
    public String success(){
        return "ok.html";
    }

    @RequestMapping("err")
    public String error(){
        return "error.html";
    }
}
